CREATE TABLE [dbo].[TCCANJ_PRIN]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_PROV] [dbo].[TD_VC_020] NOT NULL,
[NU_CANJ] [dbo].[TD_VC_008] NOT NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NOT NULL,
[FE_CANJ] [dbo].[TD_DT_001] NOT NULL,
[NU_PROC] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TCCANJ_PR__NU_PR__778AC167] DEFAULT ((0)),
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TCCANJ_PR__CO_US__787EE5A0] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCCANJ_PR__FE_US__797309D9] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008] NOT NULL,
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TCCANJ_PR__FE_US__7A672E12] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCCANJ_PRIN] ADD CONSTRAINT [PK__TCCANJ_P__B16C2F4C7B3C2211] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_PROV], [NU_CANJ], [CO_UNID_CONC], [FE_CANJ], [NU_PROC]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TCCANJ_PRIN] ADD CONSTRAINT [FK__TCCANJ_PRIN__79FDE515] FOREIGN KEY ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_CANJ], [FE_CANJ]) REFERENCES [dbo].[TCCANJ_PROV] ([CO_EMPR], [CO_UNID_CONC], [CO_PROV], [NU_CANJ], [FE_CANJ])
GO
